package com.sxj.corejava.code05_反射;

import java.io.Serializable;

/**
 * @author 石小俊
 * @date 2023年12月2023/12/19日 19:50
 */
public class User extends Person implements Serializable{
    public String username;
    private String password;

    public int add(int i, int j){
        return i+j;
    }

    public double add(double i, double j){
        return i+j;
    }
    private void show(){
        System.out.println("这是private修饰的方法");
    }

    public void test(){
        System.out.println("这是public修饰的test方法");
    }


    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }

    public User() {
    }

    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }

    private User(String username) {
        this.username = username;
    }
}
